package com.jk.bgmainconsumer.controller;

import com.jk.bgmainconsumer.entity.TreeEntity;
import com.jk.bgmainconsumer.service.TreeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("tree")
public class GoodsTreeController {
    @Autowired
    private TreeService treeService;
    @RequestMapping("getRecTree")
    public List<TreeEntity> getRecTree(Integer pid){
        return treeService.getTree(pid);
    }
}
